package com.fqr;

import java.util.List;


public class Information {

	private static Information instance;

	//castor will call the constructor, then the setters
	public Information() {
		instance = this;
	}

	public static Information getInstance() {
		return instance;
	}

	private List<Infolet> infolets;

	public List<Infolet> getInfolets() {
		return infolets;
	}

	public void setInfolets(List<Infolet> infolets) {
		this.infolets = infolets;
	}

	public Infolet getInfolet(String name) {
		if (name != null && name.trim().length() > 0)
			for (Infolet i : infolets)
				if (name.equals(i.getName()))
					return i;

		return null;
	}

}
